package com.jinken.controller;

import com.jinken.rocketmq.MessageProducer;
import org.apache.rocketmq.client.producer.SendResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @Autowired
    private MessageProducer messageProducer;

    @RequestMapping("/addOrder")
    public SendResult addOrder(){
        return messageProducer.sendMessage("华为p70 下单成功");
    }
}
